<!DOCTYPE html>
<html>
    <head>
        <title>爱淘爱生活</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="initial-scale=1,maximum-scale=1">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
        <link rel="stylesheet" type="text/css" href="/source/site.css?<?=\Config\System::$site['version']?>">
        <link rel="shortcut icon" href="/source/icon.png">
    </head>
    <body>
        <div class="page-group">
            <div class="page">
                <header class="bar">
                    <h1 class="title">红包统计</h1>
                </header>

                <?php
                include TPL_PATH . 'toolBar.html';
                ?>

                <div class="content tab-main-list">
                    <div class="buttons-tab my-tab packet-tj">
                        <a href="#pr" class="tab-link button<?php if($tab_type == 'pr'): ?> active<?php endif;?>">近期发放红包</a>
                        <a href="#pa" class="tab-link button<?php if($tab_type == 'pa'): ?> active<?php endif;?>">红包总榜</a>
                        <a href="#pm" class="tab-link button<?php if($tab_type == 'pm'): ?> active<?php endif;?>">红包月榜</a>
                    </div>

                    <div class="list-block the-packettop">
                        <ul>
                            <?php foreach($dataList as $k => $d): ?>
                            <li>
                                <div class="item-content">
                                    <div class="item-inner">
                                        <div>
                                            <img src="<?=\Config\System::$site['thumb']?>" title="<?=$d['headimgurl']?>" style="width: 2.2rem;" />
                                            <div style="display: inline-block;">
                                                <p><?=$k+1?>、<?=$d['nickname']?></p>
                                                <p>已领红包 <span class="red"><?=$d['packet']?>元</span></p>
                                            </div>
                                        </div>
                                    </div>
                            </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                </div>
                <?php 
                include TPL_PATH . 'panel.html';
                ?>
            </div>
        </div>
        <script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
        <script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
        <script type="text/javascript" src="/source/tab.js?v=?<?=\Config\System::$site['version']?>"></script>
        <script type="text/javascript">
                    $(function () {
                        $('.the-packettop').find('img').each(function () {
                            var title = $(this).attr('title');
                            if (title) {
                                $(this).attr('src', title);
                            }
                        });
                    });
        </script>
    </body>
</html>
